package com.xuecheng.api.media;

import com.xuecheng.api.content.model.dto.CourseBaseDTO;
import com.xuecheng.api.content.model.qo.QueryCourseModel;
import com.xuecheng.api.media.aliyun.VodUploadRequest;
import com.xuecheng.api.media.aliyun.VodUploadToken;
import com.xuecheng.api.media.model.dto.MediaDTO;
import com.xuecheng.api.media.model.vo.MediaVO;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author by 高鹏
 * @Date 2021/12/14
 * @Description
 */
@Api("媒资管服务Api")
public interface AliyunVodApi {

    @ApiOperation("获得媒资文件上传凭证")
    VodUploadToken generateUploadToken(VodUploadRequest request);


    @ApiOperation("刷新媒资文件上传凭证")
    @ApiImplicitParam(name = "videoId",value = "媒资文件的id值",required = true,paramType = "path",dataType = "String")
    VodUploadToken refreshUploadToken(String videoId);

    @ApiOperation("保存媒资信息")
    @ApiImplicitParam(name = "vo", value = "媒资保存信息", required = true, dataType = "MediaVO", paramType = "body")
    MediaDTO createMedia(MediaVO vo);

    @ApiOperation("分页条件查询课程基本信息")
    PageVO<CourseBaseDTO> queryMediaVodList(PageRequestParams params, @RequestBody MediaVO mediaVO);


    @ApiOperation("获得媒资信息预览资源地址")
    @ApiImplicitParam(name="mediaId",value = "媒资id值",required = true,dataType = "Long",paramType = "path")
    String previewMedia(Long mediaId);

    @ApiOperation("删除媒资信息")
    @ApiImplicitParam(name = "mediaId", value = "媒资id值", required = true, dataType = "Long", paramType = "path")
    Boolean deleteMedia(Long mediaId);

}
